package net.message
{

	import flash.utils.IDataInput;
	import net.MessageType;
	import net.handler.GC_Hero_TraitUpHandler;
	import util.Long;

	/**
	 * 文件名：GC_Hero_TraitUpMessage.as
	 * <p>
	 * 功能：武将资质提升
	 * <p>
	 * 版本：1.0.0
	 * <p>
	 * 作者：Builderd by AppTools
	 * <p>
	 */
	public class GC_Hero_TraitUpMessage extends BaseMessage
	{

		//写入操作结果反馈：1：成功，0：无此武将或升级限制，-1：通货不足
		public var feedback:int;
		//写入武将key
		public var entityId:Long;
		//写入武将id
		public var id:uint;
		//写入武将级别
		public var lv:uint;
		//写入武将资质
		public var trait:uint;
		//写入已确定的刷出来的智力
		public var winsdomAppend:uint;
		//写入已确定的刷出来的基础
		public var strengthAppend:uint;
		//写入已确定的刷出来的基础
		public var luckyAppend:uint;


		public function GC_Hero_TraitUpMessage()
		{
			super();
			type = MessageType.GC_Hero_TraitUp;
			handler = new GC_Hero_TraitUpHandler();
		}

		override public function readMessage(data:IDataInput):void
		{
			//写入操作结果反馈：1：成功，0：无此武将或升级限制，-1：通货不足
			feedback = data.readInt();
			//写入武将key
			entityId = Long.read(data);
			//写入武将id
			id = data.readShort();
			//写入武将级别
			lv = data.readShort();
			//写入武将资质
			trait = data.readShort();
			//写入已确定的刷出来的智力
			winsdomAppend = data.readShort();
			//写入已确定的刷出来的基础
			strengthAppend = data.readShort();
			//写入已确定的刷出来的基础
			luckyAppend = data.readShort();
		}
	}
}
